package easy.trace.core.dto;

import java.util.HashMap;
import java.util.Map;

/**
 * @author easy
 */
public class TransferParams {
    private Long traceId = 0L;
    private Long parentId = 0L;
    private Long selfId = 0L;
    private boolean existTraceHeader = false;
    private Map<String, Object> transferMap = new HashMap<>();

    public Long getTraceId() {
        return traceId;
    }

    public void setTraceId(Long traceId) {
        this.traceId = traceId;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Long getSelfId() {
        return selfId;
    }

    public void setSelfId(Long selfId) {
        this.selfId = selfId;
    }

    public boolean existTraceHeader() {
        return existTraceHeader;
    }

    public boolean notExistTraceHeader() {
        return !existTraceHeader;
    }

    public void isExistTraceHeader(boolean existTraceHeader) {
        this.existTraceHeader = existTraceHeader;
    }

    public void addParams(String key, Object value) {
        transferMap.put(key, value);
    }

    public Map<String, Object> getParams() {
        return transferMap;
    }
}
